package o;

import android.text.TextUtils;
import android.view.ViewGroup;
import com.huawei.appgallery.festivalanimation.particle.ParticleManager;
import com.huawei.hmf.annotation.ApiDefine;
import com.huawei.hwphy2d.HwPhysicalManager;

@ApiDefine(uri = bqs.class)
public class bqu implements bqs {
    private static final String ॱ = bqu.class.getSimpleName();
    private HwPhysicalManager ˊ;
    private ParticleManager ˎ;
    private String ˏ = "";

    public void ॱ(String str) {
        this.ˏ = str;
    }

    public void ˎ(ViewGroup viewGroup, int i) {
        try {
            if (!TextUtils.isEmpty(this.ˏ)) {
                bqq.ॱ.ˋ(ॱ, "start festival animation effectType=" + i);
                if (i <= 2) {
                    this.ˎ = new ParticleManager(this.ˏ);
                    this.ˎ.startParticleEffect(viewGroup, i);
                    return;
                }
                this.ˊ = new HwPhysicalManager(this.ˏ);
                this.ˊ.startPhysicalEffect(viewGroup, i);
            }
        } catch (Exception e) {
            bqq.ॱ.ˊ(ॱ, e.toString());
        }
    }

    public void ˊ() {
        if (this.ˎ != null) {
            this.ˎ.stopParticleEffect();
        }
        if (this.ˊ != null) {
            this.ˊ.stopPhysicalEffect();
        }
    }
}
